<?php

/* @var $this yii\web\View */
/* @var $form yii\bootstrap\ActiveForm */


//use Yii;
use yii\helpers\Html;
//use yii\helpers\Url;
use yii\bootstrap\ActiveForm;
use backend\controllers\CategoryController;
use common\models\category\Category;
use frontend\controllers\ListController;
use common\models\member\Member;
use common\models\setting\Setting;

?>

<?php
$data = Category::find()->where(['status' => 1,'parent_id'=>0])->asArray()->all();
$login = Yii::$app->user->identity;

//电话号码
$phone = '';
try { $phone = Setting::findOne(['code'=>'phone'])->value;}
catch(ErrorException $e){ }
//网站logo
$imgLOGO = '';
try { $imgLOGO = Setting::findOne(['code'=>'imgLOGO'])->value;}
catch(ErrorException $e){ }

?>
<div class="wapper">
    <header>
        <div class="tou_box">
            <div class="prventn"><a href="javascript:history.go(-1)"><img src="/img/prvbtn.png" /></a></div>
            <div class="comcenter"><?= $this->params['title'];?></div>
            <div class="tou_right">
                <div class="drawer-toggle drawer-hamberger"><span><img src="/img/meu.png"></span></div>
                <div class="drawer-main drawer-default">
                    <nav class="drawer-nav" role="navigation">
                        <div class="souso"><input type="text" placeholder="请输入关键字"><img src="/img/seo-img.png"></div>
                        <div id="firstpane" class="menu_list">
                            <h3><a href="<?= yii\helpers\Url::to(['/']);?>">网站首页</a></h3>
                            <?php foreach($data as $vo){ ?>
                                <h3 class="menu_head"><?= $vo['name']; ?></h3>
                                <div class="menu_body">
                                    <?php $data2 = Category::find()->where(['parent_id' => $vo['id'], 'status' => Category::STATUS_ACTIVE])->asArray()->all();?>
                                    <?php foreach($data2 as $t) { ?>
                                        <a href="<?= yii\helpers\Url::to([$t['type'], 'id' => $t['id']]);?>"><?= $t['name']; ?></a>
                                    <?php } ?>
                                </div>
                            <?php } ?>
                        </div>
                        <script type="text/javascript">
                            $(document).ready(function(){

                                /*$("#firstpane .menu_body:eq(0)").show();*/
                                $("#firstpane h3.menu_head").click(function(){
                                    $(this).addClass("current").next("div.menu_body").slideToggle(300).siblings("div.menu_body").slideUp("slow");
                                    $(this).siblings().removeClass("current");
                                });

                                $("#secondpane .menu_body:eq(0)").show();
                                $("#secondpane h3.menu_head").mouseover(function(){
                                    $(this).addClass("current").next("div.menu_body").slideDown(500).siblings("div.menu_body").slideUp("slow");
                                    $(this).siblings().removeClass("current");
                                });

                            });
                        </script>
                    </nav>
                </div>





                <!-- /.drawer-overlay -->

                <script>
                    $(document).ready(function(){
                        $('.drawer').drawer();
                        $('.js-trigger').click(function(){
                            $('.drawer').drawer("open");
                        });
                    });
                </script>
                <!-- 代码 结束 -->
            </div>
            <div class="seo_box"><input class="seo_t" type="text" placeholder="请输入关键字"><input class="sumt" type="submit" value="搜索"></div>
        </div>

    </header>
